<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">标题:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" class="form-control" required name="row[name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">图片:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-img_url" data-rule="required" class="form-control" size="50" readonly name="row[url]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-img_url" class="btn btn-danger plupload" data-url="banner/upload" data-input-id="c-img_url" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-img_url"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-img_url"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-img_url"></ul>
        </div>
    </div>

    <div class="form-group" id="state_type">
        <label class="control-label col-xs-12 col-sm-2">类型:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[type]', ['0'=>'小程序内部链接', '1'=>'网址', '2'=>'富文本', '3'=>'首页弹窗'])}
        </div>
    </div>
    <div class="form-group link_type">
        <label class="control-label col-xs-12 col-sm-2">跳转类型:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-link_type" class="form-control" name="row[link_type]" value="">
        </div>
    </div>
    <div class="form-group link">
        <label class="control-label col-xs-12 col-sm-2">链接:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-link" class="form-control" name="row[link]" value="">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">状态:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['1'=>'显示','0'=>'隐藏'])}
        </div>
    </div>
    <div class="form-group sort">
        <label class="control-label col-xs-12 col-sm-2">排序:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sort" class="form-control"  placeholder="排序由高到低" name="row[sort]" type="number" value="">
        </div>
    </div>
    <div class="form-group contents" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">*内容:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea class="form-control editor" id="c-content" name="row[content]" cols="90" rows="50"></textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
